﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="QuanLyMenu.ascx.cs" Inherits="Solutions.Admin.QuanLyMenu.QuanLyMenu" %>
<dx:ASPxButton ID="btnOpenForm" Theme="Aqua" runat="server" AutoPostBack="False" EncodeHtml="False" Height="22px" Text="Thêm mới" OnClick="OpenForm_Click">
    <Image Url="../Skins/style/IMG/icon/Add.png" Width="16px" Height="16px" />
</dx:ASPxButton>
<dx:ASPxTextBox runat="server" Visible="False" ID="hdIdMenu"></dx:ASPxTextBox>
<dx:ASPxGridView ID="grdDanhSachMenu" runat="server" Caption="Danh sách menu" Width="100%" OnRowCommand="grdTest_RowCommand"
    KeyFieldName="pk_iMenuID" AutoGenerateColumns="False" EnableTheming="True" Theme="Aqua">

    <Columns>
        <dx:GridViewDataTextColumn Caption="STT" VisibleIndex="0" Width="40" HeaderStyle-Font-Bold="True" HeaderStyle-HorizontalAlign="Center">
            <DataItemTemplate>
                <%#Container.ItemIndex +1 %>
            </DataItemTemplate>
            <HeaderStyle HorizontalAlign="Center" Font-Bold="True"></HeaderStyle>
        </dx:GridViewDataTextColumn>
        <dx:GridViewDataTextColumn FieldName="sTenMenu" Width="200" Caption="Tên menu" VisibleIndex="1" HeaderStyle-Font-Bold="True" HeaderStyle-HorizontalAlign="Center">
            <HeaderStyle HorizontalAlign="Center" Font-Bold="True"></HeaderStyle>
        </dx:GridViewDataTextColumn>
        <dx:GridViewDataTextColumn FieldName="sTenControl" Width="100" Caption="Tên control" VisibleIndex="2" HeaderStyle-Font-Bold="True" HeaderStyle-HorizontalAlign="Center">
            <HeaderStyle HorizontalAlign="Center" Font-Bold="True"></HeaderStyle>
        </dx:GridViewDataTextColumn>
        <dx:GridViewDataTextColumn FieldName="sTenThuMuc" Width="200" Caption="Tên thư mục" VisibleIndex="3" HeaderStyle-Font-Bold="True" HeaderStyle-HorizontalAlign="Center">
            <HeaderStyle HorizontalAlign="Center" Font-Bold="True"></HeaderStyle>
        </dx:GridViewDataTextColumn>
        <dx:GridViewDataTextColumn FieldName="iCap" Width="100" Caption="Cấp" VisibleIndex="4" HeaderStyle-Font-Bold="True" HeaderStyle-HorizontalAlign="Center">
            <HeaderStyle HorizontalAlign="Center" Font-Bold="True"></HeaderStyle>
        </dx:GridViewDataTextColumn>
        <dx:GridViewDataTextColumn FieldName="iSoThuTu" Width="200" Caption="Số thứ tự" VisibleIndex="5" HeaderStyle-Font-Bold="True" HeaderStyle-HorizontalAlign="Center">
            <HeaderStyle HorizontalAlign="Center" Font-Bold="True"></HeaderStyle>
        </dx:GridViewDataTextColumn>
        <dx:GridViewDataTextColumn Caption="Edit" VisibleIndex="6" Width="40px" HeaderStyle-Font-Bold="True" HeaderStyle-HorizontalAlign="Center" CellStyle-HorizontalAlign="Center">
            <DataItemTemplate>
                <asp:ImageButton ID="imbEdit" runat="server"
                    CommandName="Edit"
                    ImageUrl="../Skins/style/IMG/icon/Edit.png" ClientIDMode="Static" />
            </DataItemTemplate>

            <HeaderStyle HorizontalAlign="Center" Font-Bold="True"></HeaderStyle>

            <CellStyle HorizontalAlign="Center"></CellStyle>
        </dx:GridViewDataTextColumn>
        <dx:GridViewDataTextColumn Caption="Delete" VisibleIndex="7" Width="40px" HeaderStyle-Font-Bold="True" HeaderStyle-HorizontalAlign="Center" CellStyle-HorizontalAlign="Center">
            <DataItemTemplate>
                <asp:ImageButton ID="imbEdit" runat="server"
                    CommandName="Delete"
                    ImageUrl="../Skins/style/IMG/icon/Delete.png" ClientIDMode="Static" />
            </DataItemTemplate>

            <HeaderStyle HorizontalAlign="Center" Font-Bold="True"></HeaderStyle>

            <CellStyle HorizontalAlign="Center"></CellStyle>
        </dx:GridViewDataTextColumn>
    </Columns>
    <Styles>
        <AlternatingRow Enabled="true" />
    </Styles>
    <SettingsBehavior AllowSelectByRowClick="true" />
    <Settings VerticalScrollableHeight="430" ShowFilterRow="true" />
    <SettingsPager Position="Bottom" PageSize="20">
        <PageSizeItemSettings Items="10, 20, 50" />
    </SettingsPager>
</dx:ASPxGridView>
<dx:ASPxPopupControl ID="wdsQuanLyMenu" HeaderStyle-Font-Bold="True" runat="server" HeaderImage="../Skins/style/IMG/icon/Delete.png" MinWidth="450px" HeaderText="Thông tin menu" AllowResize="False" ClientInstanceName="popupControl" Height="320px" Modal="True" CloseAction="CloseButton" AllowDragging="True" PopupHorizontalAlign="WindowCenter" PopupVerticalAlign="WindowCenter" Theme="Aqua">
    <HeaderStyle Font-Bold="True"></HeaderStyle>
    <ContentCollection>
        <dx:PopupControlContentControl ID="PopupControlContentControl1" runat="server">

            <table class="OptionsTable" style="margin-top: 10px; margin-left: 20px;">
                <tr style="float: left; margin-bottom: 10px;">
                    <td style="width: 120px; vertical-align: top;">Tên menu <span class="redLabel">(*)</span>: &nbsp;
                    </td>
                    <td style="width: 260px; vertical-align: top;">
                        <dx:ASPxTextBox ID="txtTenMenu" runat="server" Height="25px" Width="250px" ClientInstanceName="txtPopup">
                        </dx:ASPxTextBox>
                    </td>
                </tr>
                <tr style="float: left; margin-bottom: 10px;">
                    <td style="width: 120px; vertical-align: top;">Tên control: &nbsp;
                    </td>
                    <td style="width: 260px; vertical-align: top;">
                        <dx:ASPxTextBox ID="txtTenControl" runat="server" Height="25px" Width="250px" ClientInstanceName="txtPopup">
                        </dx:ASPxTextBox>
                    </td>
                </tr>
                <tr style="float: left; margin-bottom: 10px;">
                    <td style="width: 120px; vertical-align: top;">Tên thư mục<span class="redLabel">(*)</span>:&nbsp;
                    </td>
                    <td style="width: 260px; vertical-align: top;">
                        <dx:ASPxTextBox ID="txtTenThuMuc" runat="server" Height="25px" Width="250px" ClientInstanceName="txtPopup">
                        </dx:ASPxTextBox>
                    </td>
                </tr>
                <tr style="float: left; margin-bottom: 10px;">
                    <td style="width: 120px; vertical-align: top;">Menu cha: &nbsp;
                    </td>
                    <td style="width: 260px; vertical-align: top;">
                        <dx:ASPxComboBox runat="server" ID="cboMenuCha"
                            ValueField="pk_iMenuID" TextField="sTenMenu" EnableCallbackMode="true" IncrementalFilteringMode="StartsWith" Height="25px" Width="250px" RightToLeft="False" />
                    </td>
                </tr>
                <tr style="float: left; margin-bottom: 10px;">
                    <td style="width: 120px; vertical-align: top;">Số thứ tự <span class="redLabel">(*)</span>: &nbsp;
                    </td>
                    <td style="width: 260px; vertical-align: top;">
                        <dx:ASPxTextBox ID="txtSoThuTu" runat="server" Height="25px" Width="250px" ClientInstanceName="txtPopup">
                           
                        </dx:ASPxTextBox>
                    </td>
                </tr>
                <tr style="float: left; margin-bottom: 10px;">
                    <td style="width: 120px; vertical-align: top;">Ghi chú : &nbsp;
                    </td>
                    <td style="width: 260px; vertical-align: top;">
                        <dx:ASPxMemo ID="txtsGhiChu" runat="server" Width="250px" Height="71px">
                        </dx:ASPxMemo>
                    </td>
                </tr>
            </table>
            <table style="border: none; float: right; margin-right: 20px; margin-bottom: 10px;">
                <tr>
                    <td>
                    <td style="float: left; margin-right: 10px;">
                        <dx:ASPxButton ID="btnLuuLai" runat="server" EncodeHtml="False" AutoPostBack="False" Text="Lưu lại"  OnClick="LuuLai_Click">
                        <Image Url="../Skins/style/IMG/icon/Save.png" Width="16px" Height="16px" />
                        </dx:ASPxButton>
                    </td>
                    <td style="float: left;">
                        <dx:ASPxButton ID="btnUpdate" runat="server" EncodeHtml="False" AutoPostBack="False" Text="Lưu lại"  OnClick="Update_Click">
                        <Image Url="../Skins/style/IMG/icon/SaveEdit.png" Width="16px" Height="16px" />
                        </dx:ASPxButton>
                    </td>
                    <td style="float: left; ">
                        <dx:ASPxButton ID="btnReset" runat="server" EncodeHtml="False" AutoPostBack="False" Text="Xóa trắng"  OnClick="Reset_Click">
                        <Image Url="../Skins/style/IMG/icon/Clear.png"  Width="16px" Height="16px" />
                        </dx:ASPxButton>
                    </td>
                    <td style="float: left; margin-left: 10px;">
                        <dx:ASPxButton ID="btnDong" runat="server" AutoPostBack="False" ClientInstanceName="btnCancel"
                            Text="Đóng" >
                            <ClientSideEvents Click="function(s, e) {popupControl.Hide();}" />
                            <Image Url="../Skins/style/IMG/icon/Close.png" Width="16px" Height="16px" />
                        </dx:ASPxButton>
                    </td>
                </tr>
            </table>
        </dx:PopupControlContentControl>
    </ContentCollection>
</dx:ASPxPopupControl>

